
const { ccclass, property } = cc._decorator;

@ccclass
export default class WaitingTouchBlock extends cc.Component {

    protected onLoad(): void {
        this.node.opacity = 0
    }

    onEnable() {
        this.node.getChildByName('loading').angle = 0
        this.scheduleOnce(() => {
            this.node.opacity = 255
        }, 0.3)
    }

    onDisable(): void {
        this.unscheduleAllCallbacks()
        this.node.opacity = 0
    }

    protected update(dt: number): void {
        this.node.getChildByName('loading').angle += 4
    }
}
